/**
 * 
 */
var interval;
var cnt=0;
var week=['일','월','화','수','목','금','토'];
function intervalinit()
{
	document.getElementById('btnstart').onclick=stafunc;
	document.getElementById('btnstop').onclick=stofunc;
}
function stafunc()
{
	interval=setInterval(clock, 1000);
}
function stofunc()
{
	clearInterval(interval);
}
function clock()
{
	var now=new Date();
	cnt=now.getFullYear()+'년';
	cnt+=(now.getMonth()+1)+'월';
	cnt+=(now.getDate())+'일(';
	cnt+=week[now.getDate()]+'요일)';
	
	cnt+=now.getHours()+':';
	cnt+=now.getMinutes()+':';
	cnt+=now.getSeconds();
	
	var r = document.getElementById('result');
	r.innerHTML = cnt;
}
